<?php
namespace app\validate;

use think\Validate;

class PartnerUser extends  Validate{
    protected $rule =   [
        'mobile'  =>['require', 'mobile', 'regex' => '/^1[34578]\d{9}$/'],
        'nickname'   => 'require|max:100',
        'password' => 'require|max:30',
        'role_id'=>'require',
        'name'=>'require',
    ];

    protected $message  =   [
        'mobile.require' => '手机号不能为空',
        'mobile.regex' => '手机号格式不正确',
        'nickname.require'     => '昵称不能为空',
        'password.require'   => '密码不能为空',
        'role_id.require'   => '角色id不能为空',
        'name.require' =>'账号号码不能为空'
    ];
}